package com.common.util;

import java.io.Serializable;

/**
 * 线程变了 保存当前登录用户常用参数信息
 * 
 * @author chenlujun
 * @version [版本号, 2014-10-29]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class WebContent implements Serializable {

	private static final long serialVersionUID = 6694128302656004232L;
	
	private static ThreadLocal<WebContent> context = new ThreadLocal<WebContent>();

	public static WebContent getContext() {
		WebContent ci = context.get();
		if (ci == null) {
			ci = new WebContent();
			context.set(ci);
		}
		return ci;
	}

	public static void removeContext() {
		context.remove();
	}

}
